// 导入网络请求模块
import request from '@/utils/request'
// 向外共享登陆注册的接口
export const login = data => request({
  url: '/app/v1_0/authorizations',
  method: 'post',
  data
})
// 获取验证码的接口
export const sendSms = moblie => request({
  url: '/app/v1_0/sms/codes/' + moblie
})
// 获取用户的基本信息
export const userInfo = () => request({
  url: '/app/v1_0/user'
})
// 获取用户个人资料
export const getUserProfile = () => request({
  url: '/app/v1_0/user/profile'
})
// 修改用户昵称
export const editUserName = data => request({
  method: 'PATCH',
  url: '/app/v1_0/user/profile',
  data
})
// 编辑用户照片资料
export const updateUserPhoto = data => request({
  method: 'PATCH',
  url: '/app/v1_0/user/photo',
  data
})
